Adam Richardson's Site

Fedora Notes

Table of Contents

<2023-05-29 Mon>

Package Management

Updating Packages

  • Run dnf check-update to see a list of packages that need updating
  • To upgrade an individual package run dnf upgrade <PACKAGE>
  • To upgrade all packages run dnf upgrade

Finding Packages

  • To search through rpms run dnf search <PACKAGE>
  • To search through all sources run dnf search all <PACKAGE>

Listing Packages

  • dnf list will list all available and installed packages
  • dnf list installed <PACKAGE>
  • The list command uses GLOB patterns, for example, dnf list installed python*
  • To list all installed packages run dnf list installed
  • To view all of the install repos and packages installed from those repos run dnf repolist

Getting Package Info

  • dnf info <PACKAGE> will give you info about a package

Installing a Package

  • dnf install <PACKAGE>

Removing a Package

  • dnf remove <PACKAGE>

Upgrading Installed Packages

  • sudo dnf update

Upgrading to Latest Fedora Release

sudo dnf upgrade --refresh
# reboot if there are any changes
sudo dnf install dnf-plugin-system-upgrade
sudo dnf system-upgrade download --releasever=36
sudo dnf system-upgrade reboot

Viewing dnf History

  • dnf will record history of packages added and removed
  • To view the history run sudo dnf history list

Enabling RPM Fusion

sudo dnf install \
  https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm

Installing RPM files

  • sudo dnf install <PACKAGE>.rpm

Package List

sudo dnf install \
        mg \
        gnome-tweaks \
        ffmpeg \
        ffmpeg-libs \
        autoconf \
        texinfo \
        ImageMagick-devel \
        glib2-devel \
        gtk3-devel \
        libgccjit-devel \
        jansson-devel \
        gnutls-devel \
        ncurses-devel \
        htop \
        mosh \
        pass \
        pass-otp \
        syncthing \
        lua-devel \
        libass-devel \
        ledger \
        isync \
        notmuch \
        sbcl \
        clisp \
        nethack \
        openttd \
        python3-pip \
        ncdu \
        retroarch \
        inkscape \
        picocom  \
        abcde \
        beets \
        beets-plugins \
        fluidsynth \
        fluid-soundfont-gm \
        fluid-soundfont-gs \
        gimp \
        automake \
        SDL2-devel \
        SDL2_mixer-devel \
        SDL2_net-devel \
        glibc-doc \
        p7zip \
        fzf \
        lm_sensors \
        vlc \
        foliate \
        texinfo-tex \
        stow \
        libtree-sitter-devel \
        java-latest-openjdk \
        clang \
        clang-tools-extra \
        shellcheck \
        ghostscript-tools-dvipdf \
        alacritty \
        giflib-devel \
        libXpm-devel \
        git-gui \
        glew-devel \
        mpv \
        cmake \
        libvterm-devel

Wayland

  • To see if you are in a Wayland session run echo $WAYLAND_DISPLAY

Building Emacs

  • clone Emacs from Savannah git clone -b master git://git.sv.gnu.org/emacs.git
  • Run the ./autogen.sh to build the configure script
  • The below command shows the configure flags I like for Emacs
./configure --with-native-compilation \
            --with-json \
            --with-rsvg \
            --with-imagemagick \
            --with-pgtk \
            --with-tree-sitter

Hack Font

  • Download the latest release of the font from the Hack GitHub page.
  • Extract the zip and copy the files to /usr/share/fonts in a folder named Hack
  • Download the font config file from GitHub
  • Create a user local font config dir if it doesn't exist, mkdir -p ~/.config/fontconfig/conf.d
  • Copy the downloaded font config into that folder, cp 45-Hack.conf ~/.config/fontconfig/conf.d
  • Regenerate your font cache, fc-cache -f -v
  • Verify it is installed with, fc-list | grep Hack

Flatpak

  • Flatpak is preinstalled on Fedora
  • The Flathub repository needs to be enabled in order to use software from it
  • Flatpak: Fedora Setup
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

Various Flatpaks

  • flatpak install flathub dev.ares.ares
  • flatpak install flathub org.signal.Signal

Issue where SDL2 Apps Crash on Exit

  • This is probably due to the wayland video driver in SDL2
  • A workaround is to set the environment variable SDL_VIDEODRIVER to use x11 rather than wayland

Crispy Doom

  • Clone the Crispy Doom Source from GitHub
  • Inside the folder run the following:
autoreconf -fiv
./configure
make
sudo make install

Intel Performance Support

MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0
  • To enable this feature add the above line to /etc/sysctl.conf

Disable Super+P in GNOME

gsettings set org.gnome.mutter.keybindings switch-monitor '[]'

Set Hostname with hostnamectl

  • Fedora Docs: Changing Hostname
  • There are multiple "hostnames" that can be set with hostnamectl
  • The three main options are: transient, static and pretty
  • Transient seems to be the hostname you get if you don't set a static one
  • Static seems like a traditional hostname
  • The pretty name seems to allow characters that are not traditionally allowed in a hostname like spaces and quotes
sudo hostnamectl set-hostname --static <MY_STATIC_NAME>
sudo hostnamectl set-hostname --pretty <MY PRETTY NAME>

Modifying Kernel Arguments

  • The kernel arguments are stored in /etc/default/grub
  • To set the arguments add them to the variable GRUB_CMDLINE_LINUX
  • Since Fedora uses BLS config you will need to regenerate the grub.cfg
    • sudo grub2-mkconfig -o /boot/grub2/grub.cfg
  • This should update the entries in /boot/loader/entries folder
  • Find the one that matches the kernel version you are using to verify the kernel args are present
  • Reboot to use the new argument values, check via sudo dmesg to make sure they were used